package com.ins.controller;

import com.ins.common.utils.Result;
import com.ins.model.vo.UploadVO;
import com.ins.service.AppResService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * AppResController
 *
 * @author aa
 * @version 1.0
 * @since 2024/7/17
 */
@RestController
@RequestMapping("/res")
public class AppResController {

    @Resource
    private AppResService appResService;

    @PostMapping("/upload")
    public Result<UploadVO> upload(@RequestParam("file") MultipartFile file) {
        return Result.ok(appResService.upload(file));
    }
}
